package com.hnkywl.sts.entity.organ;

import com.hnkywl.sts.entity.BaseEntity;
import com.hnkywl.sts.entity.base.Fj;
import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;
import org.hibernate.annotations.Where;

import javax.persistence.*;
import java.util.List;

/**
 * 说明：企业法人
 * 包:        com.hnkywl.sts.entity.organ
 * 类描述:    企业法人
 * 修改备注: [说明本次修改内容]
 * 版本:        [v1.0]
 */
@Entity
@Table(name = "T_SYS_QYFR")
@Where(clause = "deleted!='1'")
public class Qyfr extends BaseEntity {
    @Id
    @SequenceGenerator(name = "seqQyfr", allocationSize = 1, sequenceName = "SEQ_SYS_QYFR")
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "seqQyfr")
    private Long id;

    /**
     * 企业全称
     */
    private String qyqc;

    /**
     * 企业简称
     */
    private String qyjc;

    /**
     * 法定代理人
     */
    private String fddlr;

    /**
     *  内部外部企业法人   0=外部   1=内部
     */
     private  Integer  lx;
    /**
     * 委托代理人
     */
    private String wtdlr;

    /**
     * 传真
     */
    private String cz;

    /**
     * 电话
     */
    private String dh;

    /**
     * 开户行
     */
    private String khh;

    /**
     * 账号
    */
    private String zh;

    /**
     * 办公地址
     */
    private String bgdz;

    /**
     * 邮政编码
     */
    private String yzbm;

    /**
     * 纳税号
     */
    private String nsh;

    /**
     * 地址
     */
    private String address;

    /**
     * 备注
     */
    private String bz;

    /**
     * 是否已使用
     */
    private boolean sfsy;
    //纳税 开户行
    private String nskhh;

/*    *//**
     * 开户行
     *//*
    @OneToMany(mappedBy = "qyfr", cascade = CascadeType.ALL, fetch = FetchType.LAZY, targetEntity = Khh.class)
    @Where(clause = "deleted=0")
    private List<Khh> khhList;*/

    /**
     * 企业机构
     */
    @OneToMany(mappedBy = "qyfr",cascade = CascadeType.ALL,fetch = FetchType.LAZY,targetEntity = Gsjg.class)
    private List<Qyjg> qyjgList;

    /**
     * 内部公司
     */
    @OneToMany(mappedBy = "qyfr",cascade = CascadeType.ALL,fetch = FetchType.LAZY,targetEntity = Gsjg.class)
    private List<Nbgs> nbgsList;

    /**
     * 企业法人附件
     */
    @OneToMany(cascade = CascadeType.MERGE, fetch = FetchType.LAZY, targetEntity = Fj.class)
    @JoinColumn(name = "QYFR_ID")
    private List<Fj> fjList;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getQyqc() {
        return qyqc;
    }

    public void setQyqc(String qyqc) {
        this.qyqc = qyqc;
    }

    public String getQyjc() {
        return qyjc;
    }

    public void setQyjc(String qyjc) {
        this.qyjc = qyjc;
    }

    public String getFddlr() {
        return fddlr;
    }

    public void setFddlr(String fddlr) {
        this.fddlr = fddlr;
    }

    public String getWtdlr() {
        return wtdlr;
    }

    public void setWtdlr(String wtdlr) {
        this.wtdlr = wtdlr;
    }

    public String getCz() {
        return cz;
    }

    public void setCz(String cz) {
        this.cz = cz;
    }

    public String getDh() {
        return dh;
    }

    public void setDh(String dh) {
        this.dh = dh;
    }
/*
    public List<Khh> getKhhList() {
        return khhList;
    }

    public void setKhhList(List<Khh> khhList) {
        this.khhList = khhList;
    }*/

    public String getBgdz() {
        return bgdz;
    }

    public void setBgdz(String bgdz) {
        this.bgdz = bgdz;
    }

    public String getYzbm() {
        return yzbm;
    }

    public void setYzbm(String yzbm) {
        this.yzbm = yzbm;
    }

    public String getNsh() {
        return nsh;
    }

    public void setNsh(String nsh) {
        this.nsh = nsh;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getBz() {
        return bz;
    }

    public void setBz(String bz) {
        this.bz = bz;
    }

    public boolean isSfsy() {
        return sfsy;
    }

    public void setSfsy(boolean sfsy) {
        this.sfsy = sfsy;
    }

    public List<Qyjg> getQyjgList() {
        return qyjgList;
    }

    public void setQyjgList(List<Qyjg> qyjgList) {
        this.qyjgList = qyjgList;
    }

    public List<Nbgs> getNbgsList() {
        return nbgsList;
    }

    public void setNbgsList(List<Nbgs> nbgsList) {
        this.nbgsList = nbgsList;
    }

    public String getKhh() {
        return khh;
    }

    public void setKhh(String khh) {
        this.khh = khh;
    }

    public String getZh() {
        return zh;
    }

    public void setZh(String zh) {
        this.zh = zh;
    }

    public String getNskhh() {
        return nskhh;
    }

    public void setNskhh(String nskhh) {
        this.nskhh = nskhh;
    }

    public Integer getLx() {
        return lx;
    }

    public void setLx(Integer lx) {
        this.lx = lx;
    }

    public List<Fj> getFjList() {
        return fjList;
    }

    public void setFjList(List<Fj> fjList) {
        this.fjList = fjList;
    }
}

